Rainbow sensor